//
//  NetWorkingTools.swift
//  01_新浪微博
//
//  Created by 黄蓉 on 15/12/14.
//  Copyright © 2015年 黄蓉. All rights reserved.
//

import UIKit
import AFNetworking

class NetWorkingTools: AFHTTPSessionManager {
    
  private static let tools: NetWorkingTools =  {//闭包,单例
//    https://api.weibo.com/oauth2/access_token
    let urlStr = "https://api.weibo.com/"
    let baseURL = NSURL(string: urlStr)!
    let tool = NetWorkingTools(baseURL: baseURL)
    tool.responseSerializer.acceptableContentTypes = NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as? Set<String>
    
        return tool
    }()
    
    
    
   class func shareNetWorkingTools() -> NetWorkingTools {
    return tools
    }
    
    
}
